package com.zzh.jetpackdemo.paging

import androidx.lifecycle.MutableLiveData
import androidx.paging.DataSource


/**
 * @author zhangzhihao
 * @email zhangzhihao@gongjiangren.net
 * @date 2020-11-25
 * @desc
 */
class CalendarDataSourceFactory : DataSource.Factory<Int, Int>() {
    private val mSourceLiveData = MutableLiveData<CalendarDataSource>()

    override fun create(): DataSource<Int, Int> {
        val dataSource = CalendarDataSource()
        mSourceLiveData.postValue(dataSource)
        return dataSource
    }
}